package com.itheima.service.impl;

import com.itheima.dao.UserDao;
import com.itheima.service.UserService;

public class UserServiceImpl implements UserService {
    //赋值了zs
    private String name;
    //赋值了18
    private int age;
    //赋值了一个UserDaoImpl对象
   private UserDao userDao;

    @Override
    public void save() {
        System.out.println("userservice save...");
        System.out.println(name + "," + age); //zs,18
        userDao.saveUser(); // UserDaoImpl saveUser...
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public UserDao getUserDao() {
        return userDao;
    }

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }
}
